package com.slz3.business.module.goodsManagement.gooInventory.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooInventory.domain.GooInventory;
import com.slz3.business.module.goodsManagement.gooInventory.domain.GooInventoryCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class GooInventoryResAtomic extends GooInventoryResExecutor {

    public Mono<ServerResponse> add_$GooInventoryUpdateLock(ServerRequest req, GooInventory gooInventory) {
        return GooInventoryResSafeValid.add(req, gooInventory) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, gooInventory);
    }

    public Mono<ServerResponse> delete_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.delete(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$GooInventoryUpdateLock(ServerRequest req, GooInventory gooInventory) {
        return GooInventoryResSafeValid.modify(req, gooInventory) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, gooInventory);
    }

    public Mono<ServerResponse> info_$GooInventoryUpdateLock(ServerRequest req) {
        return GooInventoryResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.auditSubmit(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.audit(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.auditReject(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.usingEnable(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.usingDisable(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }

    public Mono<ServerResponse> sync_$GooInventoryUpdateLock(ServerRequest req, GooInventoryCondition gooInventoryCondition) {
        return GooInventoryResSafeValid.sync(req, gooInventoryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.sync(req);
    }
}
